.TH std::shared_timed_mutex::lock_shared 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::shared_timed_mutex::lock_shared \- std::shared_timed_mutex::lock_shared

.SH Synopsis
   void lock_shared();  \fI(since C++14)\fP

   Acquires shared ownership of the mutex. If another thread is holding the mutex in
   exclusive ownership, a call to lock_shared will block execution until shared
   ownership can be acquired.

   If lock_shared is called by a thread that already owns the mutex in any mode
   (exclusive or shared), the behavior is undefined.

   If more than the implementation-defined maximum number of shared owners already
   locked the mutex in shared mode, lock_shared blocks execution until the number of
   shared owners is reduced. The maximum number of owners is guaranteed to be at least
   10000.

   Prior unlock() operation on the same mutex synchronizes-with (as defined in
   std::memory_order) this operation.

.SH Parameters

   \fI(none)\fP

.SH Return value

   \fI(none)\fP

.SH Exceptions

   Throws std::system_error when errors occur, including errors from the underlying
   operating system that would prevent lock from meeting its specifications. The mutex
   is not locked in the case of any exception being thrown.

.SH Notes

   lock_shared() is usually not called directly: std::shared_lock is used to manage
   shared locking.

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

   lock            locks the mutex, blocks if the mutex is not available
                   \fI(public member function)\fP
                   tries to lock the mutex for shared ownership, returns if the mutex
   try_lock_shared is not available
                   \fI(public member function)\fP
   unlock_shared   unlocks the mutex (shared ownership)
                   \fI(public member function)\fP

.SH Category:
     * Todo no example
